import { locations } from "../../../../gpu/locations";
export const AoMap_def = /*wgsl*/ `
#if ~{def.aoMap}
  @group(${locations.aoMap[0]}) @binding(${locations.aoMap[1]}) var aoMap: texture_2d<f32>;
  @group(${locations.aoMapSampler[0]}) @binding(${locations.aoMapSampler[1]}) var aoMap_sampler: sampler;
  fn cal_ao(input:Input)->f32{
    var uv = cal_uv(input);
    var ambientOcclusion:f32=(textureSample(aoMap, aoMap_sampler, uv).r - 1.0) * material.aoMapIntensity + 1.0;;
    return ambientOcclusion;
  }
#endif
`
